import request from '/@/utils/request'
import {module} from '/@/api/ums'

export default {
  /**
   * 分页数据
   */
  getPage(params) {
    return request({
      url: module + '/customerBusiness/getPage',
      method: 'get',
      params
    })
  },
  /**
   * 获取经营范围列表
   */
  businessSelector() {
    return request({
      url: module + '/customerBusiness/businessSelector',
      method: 'get'
    })
  },
  /**
   * 添加经营范围
   */
  createBusiness(data) {
    return request({
      url: module + '/customerBusiness/createBusiness',
      method: 'post',
      data
    })
  },
  editData(data) {
    return request({
      url: module + '/customerBusiness/edit',
      method: 'post',
      data
    })
  },
  removeData(data) {
    return request({
      url: module + '/customerBusiness/delete',
      method: 'post',
      data
    })
  },
  getName(businessId) {
    return request({
      url: module + '/customerBusiness/getName?id=' + businessId,
      method: 'get'
    })
  }
}
